package Q944

/**
 * 删列造序
 * @author 23737
 * @date 2022.5.12
 */
fun main() {

}


class Solution {
    fun minDeletionSize(strs: Array<String>): Int {
        val row = strs.size
        val col = strs[0].length
        var ans = 0
        for (j in 0 until col) {
            for (i in 1 until row) {
                if (strs[i - 1][j] > strs[i][j]) {
                    ans++
                    break
                }
            }
        }
        return ans
    }
}

